/*
 * @Copyright: 2017 www.yyfax.com Inc. All rights reserved.
 */
package com.yyfax.pay.common.model.to;

import java.io.Serializable;

import javax.validation.Valid;
import javax.validation.constraints.NotNull;

import org.hibernate.validator.constraints.NotBlank;

import com.yyfax.commons.json.FastJsonUtil;

/**
 * 支付模块请求包封装
 * 
 * @author buyi
 * @date 2017-05-23 14:27:41
 * @since v1.0.0
 */
@SuppressWarnings("serial")
public class YYPayApiReq2<P> implements Serializable {

	/** 商户号 */
	@NotBlank(message = "商户号merchantCode不能为空")
	private String merchantCode;
	/** 签名参数 */
	@NotBlank(message = "签名值sign不能为空")
	private String sign;

	/** 参数列表 */
	@Valid
	@NotNull(message = "请求参数params不能为空")
	private P params;

	public String getMerchantCode() {
		return merchantCode;
	}

	public void setMerchantCode(String merchantCode) {
		this.merchantCode = merchantCode;
	}

	public String getSign() {
		return sign;
	}

	public void setSign(String sign) {
		this.sign = sign;
	}

	public P getParams() {
		return params;
	}

	public void setParams(P params) {
		this.params = params;
	}

	@Override
	public String toString() {
		return FastJsonUtil.toJson(this);
	}
}
